package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 供应商提现记录对象 supplier_withdraw_audit
 *
 * @author tencreat
 * @date 2022-03-17
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("supplier_withdraw_audit")
public class SupplierWithdrawAudit extends BaseEntity<SupplierWithdrawAudit> {
    private static final long serialVersionUID = 1L;


    /** id */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /** 供应商uuid  sys_user表 userId */
    @Excel(name = "用户ID",sort = 1)
    @ApiModelProperty(value= "供应商uuid")
    @TableField("`uuid`")
    private Long uuid;

    @Excel(name = "供应商名称", sort = 3)
    @ApiModelProperty(value= "供应商名称")
    @TableField("`name`")
    private String name;

    @Excel(name = "手机号码",sort = 2)
    @ApiModelProperty(value= "供应商手机号码")
    @TableField("`mobile`")
    private String mobile;

    /** 1提现 2代付 */
    @ApiModelProperty(value= "1提现 2代付")
    @TableField("`type`")
    private Integer type;


    /** 提现类型 1wx 2支付宝 3银行卡 */
    @Excel(name = "提现类型",sort = 5, readConverterExp = "1=微信,2=支付宝,3=银行卡")
    @ApiModelProperty(value= "提现类型 1wx 2支付宝 3银行卡")
    @TableField("`withdraw_type`")
    private Integer withdrawType;


    /** 余额表id */
    @ApiModelProperty(value= "余额表id")
    @TableField("`balance_id`")
    private Long balanceId;


    /** 金额 */
    @Excel(name = "提现金额",sort = 4)
    @ApiModelProperty(value= "金额")
    @TableField("`value`")
    private BigDecimal value;


    /** 审核结果 0未审核 1审核通过 2审核失败 */
    @Excel(name = "提现状态",sort = 6 , readConverterExp = "0=未审核,1=已完成,2=审核失败")
    @ApiModelProperty(value= "审核结果 0未审核 1审核通过 2审核失败")
    @TableField("`result`")
    private Integer result;

    /** 审核时间 */
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 7)
    @TableField(exist = false)
    @ApiModelProperty(value= "申请时间")
    private LocalDateTime createTime2;


    /** 审核时间 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("`audit_time`")
    @ApiModelProperty(value= "审核时间")
    private LocalDateTime auditTime;


    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;


    /** 租户ID */
    @ApiModelProperty(value= "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;


    /** 手续费 */
    @ApiModelProperty(value= "手续费")
    @TableField("`service_money`")
    private BigDecimal serviceMoney;


    @TableField(exist = false)
    @ApiModelProperty(value= "手机号")
    private String auditMobile;

    @TableField(exist = false)
    @ApiModelProperty(value= "账号/卡号")
    private String phone;

    @TableField(exist = false)
    @ApiModelProperty(value= "bankName")
    private String bankName;

    @TableField(exist = false)
    @ApiModelProperty("收款码")
    private String qr;

    @ApiModelProperty(value="创建时间-开始时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value="创建时间-结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime endTime;

    @ApiModelProperty(value="审核时间-开始时间")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime auditStartTime;

    @ApiModelProperty(value="审核时间-结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private LocalDateTime auditEndTime;

    @ApiModelProperty(value= "审核原因")
    @TableField("`audit_opinion`")
    private String auditOpinion;


}
